using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using QuanLyThuVien1.BUS;
using QuanLyThuVien1.DAO;
using QuanLyThuVien1.DTO;

namespace QuanLyThuVien1.GUI
{
    public partial class Fr_ManHinhDangNhapThanhCongCuaNhanVien : Form
    {
        public Fr_ManHinhDangNhapThanhCongCuaNhanVien()
        {
            InitializeComponent();
        }


        private void bt_TraCuu_Click(object sender, EventArgs e)
        {
            FrManHinhDangNhapThanhCongOfDG fr = new FrManHinhDangNhapThanhCongOfDG();
            fr.button3.Visible = false;
            fr.lb_TraCuu.Visible = true;
            fr.label1.Visible = false;
            fr.Show();
        }

        private void b_HieuChinhTT_Click(object sender, EventArgs e)
        {
            Fr_NhanVienHieuChinh fr = new Fr_NhanVienHieuChinh();
            string tenTaiKhoan = Frm_ManHinhChinh.taiKhoan;
            CNhanvien_Bus n = new CNhanvien_Bus();
            NHANVIEN n1 = new NHANVIEN();
            n1 = n.LayThongTinCuaNhanVien_Bus(tenTaiKhoan);
            fr.cb_ChucVu.Text = n1.CHUCVU;
            fr.tb_CMND.Text = n1.SOCMND.ToString();
            fr.tb_maNV.Text = n1.MANHANVIEN;
            fr.tb_Phai.Text = n1.PHAI;
            fr.tb_TenNV.Text = n1.TENNHANVIEN;
            fr.tb_NgaySinh.Text = n1.NGAYSINH.Day.ToString() + "/" + n1.NGAYSINH.Month.ToString() + "/" + n1.NGAYSINH.Year.ToString();
            fr.ShowDialog();
        }

        private void bt_Thoat_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void b_lapThe_Click(object sender, EventArgs e)
        {
            Fr_LapThe fr = new Fr_LapThe();
            fr.tb_NguoiLap.Text = tbTenNhanVien.Text;
            fr.Show();
        }

        private void b_themNV_Click(object sender, EventArgs e)
        {
            Fr_ThemNV fr = new Fr_ThemNV();
            fr.Show();
        }

        private void b_nhanSach_Click(object sender, EventArgs e)
        {
            Fr_NhanSach fr = new Fr_NhanSach();
            fr.tb_NguoiNhan.Text = tbTenNhanVien.Text;
            fr.Show();
        }

        private void b_GhiNhanMatSach_Click(object sender, EventArgs e)
        {
            Fr_GhiNhanMatSach fr = new Fr_GhiNhanMatSach();
            fr.tb_NguoiNhan.Text = tbTenNhanVien.Text;
            fr.Show();
        }

        private void b_thanhLySach_Click(object sender, EventArgs e)
        {
            Fr_ThanhLy fr = new Fr_ThanhLy();
            fr.tb_NguoiThanhLy.Text = tbTenNhanVien.Text;
            fr.ShowDialog();
        }

        private void b_lapPhieuThuTp_Click(object sender, EventArgs e)
        {
            Fr_lapphieThuTienPhat fr = new Fr_lapphieThuTienPhat();
            fr.tb_NguoiThu = tbTenNhanVien;
            
            fr.Show();
        }

        private void b_LapBaoCao_Click(object sender, EventArgs e)
        {
            Fr_BaoCao fr = new Fr_BaoCao();
            fr.Show();
        }

        private void b_NhanTS_Click(object sender, EventArgs e)
        {
            Fr_FirstPhieuTra fr = new Fr_FirstPhieuTra();
            fr.ShowDialog();
        }

        private void b_lapPM_Click(object sender, EventArgs e)
        {
            Fr_FistPhieuMuoncs fr = new Fr_FistPhieuMuoncs();
            fr.ShowDialog();
        }

     
    }
}